import request from '@/utils/request'
export function reqGetDepartments() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 删除
export function reqDelDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 新增部门接口
export function reqAddDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post'
  })
}
// 获取部门详细
export function reqGetDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 编辑部门
export function reqUpdateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    menubar: 'put',
    data
  })
}
